package pers.lxl.ajax.server.conf;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import pers.lxl.ajax.server.filter.CrossFilter;

@Configuration
public class FilterConf {

    /**
    * @description: 注册一个处理跨域的过渡器
    * @author: lxl
    * @date: 2018/9/9 14:37
    * @return: FilterRegistrationBean
    */
    // @Bean
    // public FilterRegistrationBean registrationBean() {
    //     FilterRegistrationBean crossFileterBean = new FilterRegistrationBean();
    //     crossFileterBean.addUrlPatterns("/*");
    //     crossFileterBean.setFilter(new CrossFilter());
    //     return crossFileterBean;
    // }
}
